﻿using System.Reflection;
using AutoTest.Core.Domain.FileWatching;
using AutoTest.Core.Infrastructure.IoC;
using log4net;
using log4net.Config;

//TODO: BL: resharper template for solution

namespace AutoTest.Console
{
    internal class Program
    {
        private static readonly ILog Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        private static void Main(string[] args)
        {
            XmlConfigurator.Configure();
            Logger.Info("AutoTest.Net v" + Assembly.GetExecutingAssembly().GetName().Version);

            var serviceLocator = new ServiceLocator();
            serviceLocator.Init();

            var fileWatcher = serviceLocator.Get<IFileWatcher>();
            fileWatcher.BeginWatching();

            System.Console.ReadLine();
        }
    }
}